<html>
<head><meta charset="utf-8"><title>Building using native code · t-compiler/arm · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/index.html">t-compiler/arm</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/Building.20using.20native.20code.html">Building using native code</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="205393973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/Building%20using%20native%20code/near/205393973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Misty De Méo <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/Building.20using.20native.20code.html#205393973">(Jul 29 2020 at 18:18)</a>:</h4>
<p>I'm testing out building something with C bindings, and noticed that while cargo seems to know its triple is <code>aarch64-apple-darwin</code>, I'm getting an <code>unknown target triple 'unknown-apple-macosx11.0.0'</code> error. Curious if you know if there's something I need to explicitly set here, or if I've run into a bug. <a href="https://gist.githubusercontent.com/mistydemeo/35269e76e696d019ad7a1a21ad598d80/raw/d64f4175806463c342eb31eb4b3739277074344a/01.cargo">https://gist.githubusercontent.com/mistydemeo/35269e76e696d019ad7a1a21ad598d80/raw/d64f4175806463c342eb31eb4b3739277074344a/01.cargo</a></p>



<a name="205395551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/Building%20using%20native%20code/near/205395551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/Building.20using.20native.20code.html#205395551">(Jul 29 2020 at 18:30)</a>:</h4>
<p>Only libc 0.2.73 and cc 1.0.58 know about the target.</p>



<a name="205395602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/Building%20using%20native%20code/near/205395602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/Building.20using.20native.20code.html#205395602">(Jul 29 2020 at 18:31)</a>:</h4>
<div class="codehilite"><pre><span></span><code>Downloaded cc v1.0.54
Downloaded libc v0.2.60
</code></pre></div>



<a name="205395663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/Building%20using%20native%20code/near/205395663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/Building.20using.20native.20code.html#205395663">(Jul 29 2020 at 18:31)</a>:</h4>
<p>So that's one worry</p>



<a name="205395855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/Building%20using%20native%20code/near/205395855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/Building.20using.20native.20code.html#205395855">(Jul 29 2020 at 18:33)</a>:</h4>
<div class="codehilite"><pre><span></span><code>error: failed to run custom build command for `ansi_colours v1.0.1`
</code></pre></div>


<p>You could try to build that crate by itself as well.</p>



<a name="205395912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/Building%20using%20native%20code/near/205395912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/Building.20using.20native.20code.html#205395912">(Jul 29 2020 at 18:33)</a>:</h4>
<p>I don't know exactly what would be generating that specific target triple though.</p>



<a name="205397079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/Building%20using%20native%20code/near/205397079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/Building.20using.20native.20code.html#205397079">(Jul 29 2020 at 18:42)</a>:</h4>
<p>if building the ansi colours crate by itself works and the crate you're seeing failures with checks in the lock file, a plain <code>cargo update</code> might help...</p>



<a name="205398136"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/Building%20using%20native%20code/near/205398136" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Misty De Méo <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/Building.20using.20native.20code.html#205398136">(Jul 29 2020 at 18:51)</a>:</h4>
<p>I'll give both of those a try... thanks!</p>



<a name="205402028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/Building%20using%20native%20code/near/205402028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/Building.20using.20native.20code.html#205402028">(Jul 29 2020 at 19:24)</a>:</h4>
<p>I assume it does check in the lockfile. From previous context, I'm assuming this is a program in homebrew, and most executables check in their lockfile.</p>



<a name="205402120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/Building%20using%20native%20code/near/205402120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/Building.20using.20native.20code.html#205402120">(Jul 29 2020 at 19:25)</a>:</h4>
<p>This <em>may</em> be a thing you'd want to have as part of Homebrew's "patches" or whatever they are called. You could do <code>cargo update -p libc</code> and <code>cc</code> to update just those two crates, potentially.</p>



<a name="205402565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/Building%20using%20native%20code/near/205402565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Misty De Méo <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/Building.20using.20native.20code.html#205402565">(Jul 29 2020 at 19:28)</a>:</h4>
<p>Yes, I suspect we'll have to do that in a lot of places. <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>